package com.abel.manager;

import com.abel.domain.AuthPrincipal;
import com.abel.domain.AuthRequest;
import com.abel.manager.exception.AuthenticationException;
import com.abel.repository.AuthRepository;
import com.abel.repository.exception.InsufficientPermissionException;
import com.abel.repository.exception.InvalidUserCredentialsException;

public interface AuthenticationManager {


	public AuthPrincipal getAuthPrincipal(AuthRequest authRequest) throws AuthenticationException, InvalidUserCredentialsException, InsufficientPermissionException;
	
	
	public void setAuthRepository(AuthRepository authRepository);
	
	
	/**
	* verifies whether the passed user name and email address is valid
	* @param authRequest
	* @return
	* @throws AuthenticationException
	*/
	public boolean validateForgotPasswordCredentials(AuthRequest authRequest) throws AuthenticationException, InvalidUserCredentialsException;
}

